<template>
  <div>
    <van-tabs v-model="active" swipeable color="#009eef" title-active-color="#009eef">
      <van-tab title="点餐"></van-tab>
      <van-tab title="评价"></van-tab>
      <van-tab title="商家"></van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { Tabs, Tab } from "vant";
export default {
  name: "goods",
  components: {
    [Tabs.name]: Tabs,
    [Tab.name]: Tab
  },
  data() {
    return {
      active: 0
    };
    
  },
  watch: {
    active(){
      this.handler()
    }
    },
  methods: {
    handler() {
      switch (this.active) {
        case 0:
          this.$router.push("/shop/goods");
          break;
        case 1:
          this.$router.push("/shop/comments");
          break;
        case 2:
          this.$router.push("/shop/seller");
          break;
      }
    }
  }
};
</script>

<style>
</style>